package edu.cmu.aes.project2;

import java.rmi.RemoteException;

import edu.cmu.aes.project2.ws.billing.BillingServiceProxy;
import edu.cmu.aes.project2.ws.billing.Invoice;

public class BillingService {
	public edu.cmu.aes.project2.ws.billing.Invoice[] getInvoice(String customerName){
		edu.cmu.aes.project2.ws.billing.BillingService billingService = new BillingServiceProxy();
		
		try {
			Invoice[] result = billingService.getInvoice(customerName);
			if(result == null)
				return new Invoice[0];
			return result; 
		
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
		return null;
	}
}
